mudbox::Mesh Class Reference

#include <mesh.h>

Inheritance diagram for mudbox::Mesh:

Inheritance graph
[legend]
List of all members.

Detailed Description

A Mesh is a collection of vertices organized into faces, and optional Texture Coordinate information.

Mudbox models are represented by objects of the class Geometry. Each Geometry object contains a list of Meshes, one for each subdivision level. Each mesh is either entirely triangles, or entirely quads.


Public Member Functions

virtual const mudbox::ClassDesc RuntimeClass (void) const
virtual class Geometry Geometry (void) const
  Returns a pointer to the Geometry object that this mesh belongs to.
virtual class MeshRenderer Renderer (float fLODLevel=1.0f)
  Returns a pointer to a MeshRenderer with the desired level-of-detail (see MeshRenderer for more information).
virtual void  CopyTo (Mesh *pDestination) const
  Copy the content of this mesh to another one.
virtual class Material Material (void) const
  Returns a pointer to the Material associated with this mesh.
unsigned int  VertexCount (void) const
  Returns the number of vertices in the mesh.
void  SetVertexCount (unsigned int iVertexCount)
  Sets the number of vertices in the mesh. Any existing data (that fits) will be kept.
unsigned int  TCCount (void) const
  Returns the number of texture coordinates in the mesh.
virtual void  SetTCCount (unsigned int iTCCount)
  Sets the number of texture coordinate vertices in the mesh.
const Vertex VertexArray (void) const
  This method returns a pointer to the actual array data.
const Vertex VertexData (unsigned int iVertexIndex) const
  Returns a vertex.
Vertex VertexData (unsigned int iVertexIndex)
  Returns a vertex.
const Vector VertexPosition (unsigned int iVertexIndex) const
  Returns the x,y,z position of the vertex with the given index.
Vector VertexPosition (unsigned int iVertexIndex)
  Returns the x,y,z position of the vertex with the given index.
virtual const Vector VertexOriginalPosition (unsigned int iVertexIndex) const
  Returns the position of the vertex before the current sculpting-brush stroke.
const TC VertexTC (unsigned int iVertexTCIndex) const
  Returns the specified texture coordinate.
Vector  VertexNormal (unsigned int iVertexIndex) const
  Returns the normal of the vertex with the given index.
unsigned int  VertexStrokeID (unsigned int iVertexIndex) const
  Internal use only. Do not call this method.
float  VertexMask (unsigned int iVertexIndex) const
  Returns the layer mask of the vertex with the given index for the current sculpt layer.
float  VertexFreeze (unsigned int iVertexIndex) const
  Returns the freeze value of the vertex with the given index. (0.0 is not frozen; 1.0 is completely frozen).
unsigned int  FrozenVertexCount (void) const
  Returns the number of vertices having a non-zero freeze value.
const tnormal VertexNormalArray (unsigned int iVertexIndex) const
  Returns the normal of the vertex with the given index as an array of 16-bit signed values.
tnormalv  VertexNormalValue (unsigned int iVertexIndex) const
  Returns the normal of the vertex with the given index as a single 64-bit signed value.
unsigned int  VertexNormalIndex (unsigned int iVertexIndex) const
virtual AxisAlignedBoundingBox  BoundingBox (void) const
  Returns the bounding box of the mesh in local space.
void  SetVertexPosition (unsigned int iVertexIndex, const Vector &vPosition)
  Sets the position of the vertex with the given index.
void  AddVertexPosition (unsigned int iVertexIndex, const Vector &vPosition)
  Adds vPosition to the current position of the vertex with the given index.
void  SetVertexNormal (unsigned int iVertexIndex, int *pNormal)
  Internal use only. Do not call.
void  SetVertexNormal (unsigned int iVertexIndex, const Vector &vNormal)
  Sets the normal of the vertex with the given index.
void  SetVertexNormal (unsigned int iVertexIndex, int iNormal)
  Internal use only. Do not call.
void  SetVertexFreeze (unsigned int iVertexIndex, unsigned int iFaceIndex, float fFreeze)
  Sets the freeze value for the vertex with the given index.
void  SetVertexMask (unsigned int iVertexIndex, float fFMask)
  Internal use only. Do not call.
void  SetVertexStrokeID (unsigned int iVertexIndex, unsigned int iStrokeID) const
  Internal use only. Do not call.
virtual void  MarkVertex (unsigned int iVertexIndex)
  Mark a particular vertex.
virtual bool  IsVertexMarked (unsigned int iVertexIndex)
  Returns true if a particular vertex is marked.
virtual void  ClearVertexMarks (void)
  Clears all vertex marks.
const Vector TriangleVertexPosition (unsigned int iTriangleIndex, unsigned int iCornerIndex) const
  Returns the position of a corner of a mesh face.
const Vector QuadVertexPosition (unsigned int iQuadIndex, unsigned int iCornerIndex) const
  Returns the position of a corner of a mesh face. Can be used for quadric meshes only.
const TC TriangleVertexTC (unsigned int iTriangleIndex, unsigned int iCornerIndex) const
  Returns the texture coordinates of a corner of a mesh face.
const TC QuadVertexTC (unsigned int iQuadIndex, unsigned int iCornerIndex) const
  Returns the texture coordinates of a corner of a mesh face. Can be used for quadric meshes only.
Vector  TriangleVertexNormal (unsigned int iTriangleIndex, unsigned int iCornerIndex) const
  Returns the normal of a corner of a mesh face. Can be used for triangular meshes only.
Vector  QuadVertexNormal (unsigned int iQuadIndex, unsigned int iCornerIndex) const
  Returns the normal of a corner of a mesh face. Can be used for quad meshes only.
float  TriangleVertexFreeze (unsigned int iTriangleIndex, unsigned int iCornerIndex) const
  Returns the freeze value of a corner of a mesh face. Can be used for triangular meshes only.
float  QuadVertexFreeze (unsigned int iQuadIndex, unsigned int iCornerIndex) const
  Returns the freeze value of a corner of a mesh face.
const tnormal TriangleVertexNormalArray (unsigned int iTriangleIndex, unsigned int iCornerIndex) const
  Returns the normal of a corner of a triangle mesh face as an array of 16-bit signed values.
const tnormal QuadVertexNormalArray (unsigned int iQuadIndex, unsigned int iCornerIndex) const
  Returns the normal of a corner of a quad mesh face as an array of 16-bit signed values.
tnormalv  TriangleVertexNormalValue (unsigned int iTriangleIndex, unsigned int iCornerIndex) const
  Returns the normal a corner of a triangle mesh face as a single 64-bit signed value.
tnormalv  QuadVertexNormalValue (unsigned int iQuadIndex, unsigned int iCornerIndex) const
  Returns the normal a corner of a quad mesh face as a single 64-bit signed value.
virtual void  EnumerateFaces (unsigned int iFaceIndex, FaceEnumerator *pEnumerator, bool bSymmetry=false)
  This method takes an operation that you define (derived from FaceEnumerator) and applies it to the specified face, and sequentially to its neighbors, then the neighbors of those faces, until the mesh has been covered.
virtual void  EnumerateNearestFaces (unsigned int iFaceIndex, FaceEnumerator *pOperation)
  This method takes an operation that you define (derived from FaceEnumerator) and applies it to the specified face, and sequentially to its immediate neighbours.
virtual void  EnumerateVertices (unsigned int iFaceIndex, VertexEnumerator *pEnumerator)
  This method takes an operation that you define (derived from VertexEnumerator) and applies it to all the vertices of the specified face.
unsigned int  EnumerateAdjacentVertices (AdjacentVertexEnumerator *pEnumerator, unsigned int iVertexIndex, unsigned int iFaceIndex)
  This method takes an operation that you define (derived from VertexEnumerator) and applies it to all the vertices adjacent to the specified one. It returns the number of vertices that were visited.
virtual int  MeshVersion (void) const
  Obsolete method; do not use.
virtual void  SmoothTextureCoordinates (float fStrength)
  Obsolete method; do not use.
virtual void  RecalculateNormals (bool bKeep=false)
  Recalculates all the vertex normals. This is called after the mesh shape has changed.
virtual void  RecalculateAdjacency (bool bForce=true)
  Causes the mesh to build internal adjacency tables, if they don't exist already.
virtual unsigned int  CollectionID (void) const
  Obsolete method; do not use.
virtual void  IncreaseCollectionID (void)
  Obsolete method; do not use.
virtual bool  IsSelected (void)
  Returns true if the whole mesh is selected.
virtual void  SetSelected (bool bOn=true)
  Selects or unselects the whole mesh.
virtual class LayerMeshData AddLayer (void)
  Creates and returns a new empty sculpt layer for this mesh, and makes it current.
virtual class LayerMeshData ActiveLayer (void) const
  Returns a pointer to the current sculpt layer for this mesh.
virtual bool  IsActiveLevel (void) const
  Returns true if this mesh is the currently displayed mesh of the Geometry object it is part of.
virtual bool  Lock (class MeshUnlocker *pUnlocker=NULL)
  Locks the mesh for exclusive modifications.
virtual bool  Unlock (void)
  Unlock the mesh.
virtual bool  IsLocked (void)
  Returns true if the mesh is locked.
MeshChange StartChange (void)
  This method must be called by any plugin before it modifies vertex data.
virtual bool  IsNSided (void)
  Returns if the mesh contains non tri or quad faces.
virtual bool  HasExpandedTCs (void) const
  Returns if the mesh has edge bleeded TC layout.
virtual void  CreateExpandedTCs (void)
  Calculates the edge bleeded TC layout.
virtual TC ExpandedTC (unsigned int index)
  Returns the Expanded TC value for the given vertex.

Static Public Member Functions

const mudbox::ClassDesc StaticClass (void)
mudbox::Node CreateInstances (unsigned int iCount=1)

Public Attributes

Store< TC m_pTCs

Protected Member Functions

  Mesh (FaceType eFaceType=typeQuadric)
  Constructor. Do not use directly.

Protected Attributes

Store< Vertex m_pVertices
unsigned int  m_iVertexCount

Constructor & Destructor Documentation

mudbox::Mesh::Mesh FaceType  eFaceType = typeQuadric  )  [protected]
 

Constructor. Do not use directly.

Instead of constructing Meshes directly, you should use CreateInstance() like this:

            Mesh *myNewMesh = CreateInstance<Mesh>();
Parameters:
eFaceType  [in] Must be one of Topology::typeQuadric or Topology::typeTriangular

Member Function Documentation

virtual const mudbox::ClassDesc* mudbox::Mesh::RuntimeClass void   )  const [inline, virtual]
 

Reimplemented from mudbox::TreeNode.

Reimplemented in mudbox::SubdivisionLevel.

00230 :
const mudbox::ClassDesc* mudbox::Mesh::StaticClass void   )  [static]
 

Reimplemented from mudbox::TreeNode.

Reimplemented in mudbox::SubdivisionLevel.

mudbox::Node* mudbox::Mesh::CreateInstances unsigned int  iCount = 1  )  [static]
 

Reimplemented from mudbox::TreeNode.

Reimplemented in mudbox::SubdivisionLevel.

virtual class Geometry* mudbox::Mesh::Geometry void   )  const [virtual]
 

Returns a pointer to the Geometry object that this mesh belongs to.

Reimplemented in mudbox::SubdivisionLevel.

virtual class MeshRenderer* mudbox::Mesh::Renderer float  fLODLevel = 1.0f  )  [virtual]
 

Returns a pointer to a MeshRenderer with the desired level-of-detail (see MeshRenderer for more information).

Parameters:
fLODLevel  [in] the desired level-of-detail
virtual void mudbox::Mesh::CopyTo Mesh pDestination  )  const [virtual]
 

Copy the content of this mesh to another one.

virtual class Material* mudbox::Mesh::Material void   )  const [virtual]
 

Returns a pointer to the Material associated with this mesh.

unsigned int mudbox::Mesh::VertexCount void   )  const [inline]
 

Returns the number of vertices in the mesh.

00260 { return m_iVertexCount; };
void mudbox::Mesh::SetVertexCount unsigned int  iVertexCount  ) 
 

Sets the number of vertices in the mesh. Any existing data (that fits) will be kept.

Parameters:
iVertexCount  [in] the number of vertices that should be in the mesh
unsigned int mudbox::Mesh::TCCount void   )  const [inline]
 

Returns the number of texture coordinates in the mesh.

00268 { return m_pTCs.ItemCount(); };
virtual void mudbox::Mesh::SetTCCount unsigned int  iTCCount  )  [virtual]
 

Sets the number of texture coordinate vertices in the mesh.

Parameters:
iTCCount  [in] the number of texture coordinate vertices in the mesh
const Vertex* mudbox::Mesh::VertexArray void   )  const [inline]
 

This method returns a pointer to the actual array data.

This is used in cases where very fast access to the array data is required (i.e. not going through methods)

00279 { return &m_pVertices[0]; };
const Vertex& mudbox::Mesh::VertexData unsigned int  iVertexIndex  )  const [inline]
 

Returns a vertex.

Parameters:
iVertexIndex  [in] index of the vertex to be retrieved
00284                 { return m_pVertices[iVertexIndex]; };
Vertex& mudbox::Mesh::VertexData unsigned int  iVertexIndex  )  [inline]
 

Returns a vertex.

Parameters:
iVertexIndex  [in] index of the vertex to be retrieved
00289           { return m_pVertices[iVertexIndex]; };
const Vector& mudbox::Mesh::VertexPosition unsigned int  iVertexIndex  )  const [inline]
 

Returns the x,y,z position of the vertex with the given index.

Parameters:
iVertexIndex  [in] index of the vertex
00294                 { return m_pVertices[iVertexIndex].m_vPos; };
Vector& mudbox::Mesh::VertexPosition unsigned int  iVertexIndex  )  [inline]
 

Returns the x,y,z position of the vertex with the given index.

Parameters:
iVertexIndex  [in] index of the vertex
00299           { return m_pVertices[iVertexIndex].m_vPos; };
virtual const Vector& mudbox::Mesh::VertexOriginalPosition unsigned int  iVertexIndex  )  const [inline, virtual]
 

Returns the position of the vertex before the current sculpting-brush stroke.

If no stroke is in progress, result is the same as VertexPosition().

Parameters:
iVertexIndex  [in] index of the vertex
00306                 { return m_pVertices[iVertexIndex].m_vPos; };
const TC& mudbox::Mesh::VertexTC unsigned int  iVertexTCIndex  )  const [inline]
 

Returns the specified texture coordinate.

Parameters:
iVertexTCIndex  [in] index of the texture coordinate (not the same as a vertex index)
00311                 { return m_pTCs[iVertexTCIndex]; };
Vector mudbox::Mesh::VertexNormal unsigned int  iVertexIndex  )  const [inline]
 

Returns the normal of the vertex with the given index.

Parameters:
iVertexIndex  [in] index of the vertex
00316                 { return Vector( m_pVertices[iVertexIndex].m_vNormal ); };
unsigned int mudbox::Mesh::VertexStrokeID unsigned int  iVertexIndex  )  const [inline]
 

Internal use only. Do not call this method.

00320         { return m_pVertices[iVertexIndex].m_iStrokeID; };
float mudbox::Mesh::VertexMask unsigned int  iVertexIndex  )  const [inline]
 

Returns the layer mask of the vertex with the given index for the current sculpt layer.

Each sculpt layer contains vertex offsets for some subset of vertices in the mesh. Each vertex in a mesh has a mask value for each sculpt layer associated with it. This mask determines how much the vertex offset of that sculpt layer contributes to the final position of the vertex when all the sculpt layers are composited together. This mask is a multiplier, so 0.0 means the layer offset is completely masked, and 1.0 means it is not masked at all.

Parameters:
iVertexIndex  [in] index of the vertex
00334                 { return m_pVertices[iVertexIndex].Mask(); };
float mudbox::Mesh::VertexFreeze unsigned int  iVertexIndex  )  const [inline]
 

Returns the freeze value of the vertex with the given index. (0.0 is not frozen; 1.0 is completely frozen).

The freeze value is used to lock parts of the mesh so they are less affected by sculpting brushes. It is the responsibility of every sculpt brush to take into account the Freeze values on vertices it is modifying.

Parameters:
iVertexIndex  [in] index of the vertex
00345                 { return m_pVertices[iVertexIndex].Freeze(); };
unsigned int mudbox::Mesh::FrozenVertexCount void   )  const
 

Returns the number of vertices having a non-zero freeze value.

If the result is 0, no part of the mesh is frozen.

const tnormal* mudbox::Mesh::VertexNormalArray unsigned int  iVertexIndex  )  const [inline]
 

Returns the normal of the vertex with the given index as an array of 16-bit signed values.

Parameters:
iVertexIndex  [in] index of the vertex
00355                 { return m_pVertices[iVertexIndex].m_vNormal; };
tnormalv mudbox::Mesh::VertexNormalValue unsigned int  iVertexIndex  )  const [inline]
 

Returns the normal of the vertex with the given index as a single 64-bit signed value.

Parameters:
iVertexIndex  [in] index of the vertex
00361                 { return m_pVertices[iVertexIndex].m_iNormal; };
unsigned int mudbox::Mesh::VertexNormalIndex unsigned int  iVertexIndex  )  const [inline]
 
00365         { return m_pVertices[iVertexIndex].m_iNormalIndex; };
virtual AxisAlignedBoundingBox mudbox::Mesh::BoundingBox void   )  const [virtual]
 

Returns the bounding box of the mesh in local space.

void mudbox::Mesh::SetVertexPosition unsigned int  iVertexIndex,
const Vector vPosition
[inline]
 

Sets the position of the vertex with the given index.

Parameters:
iVertexIndex  [in] index of the vertex
vPosition  [in] the new vertex x,y,z position in local space
00374           { m_pVertices[iVertexIndex].m_vPos = vPosition; };
void mudbox::Mesh::AddVertexPosition unsigned int  iVertexIndex,
const Vector vPosition
[inline]
 

Adds vPosition to the current position of the vertex with the given index.

Parameters:
iVertexIndex  [in] index of the vertex
vPosition  [in] x,y,z offset to be added to the current position in local space
00381     { m_pVertices[iVertexIndex].m_vPos += vPosition; };
void mudbox::Mesh::SetVertexNormal unsigned int  iVertexIndex,
int *  pNormal
[inline]
 

Internal use only. Do not call.

00385     {
00386         m_pVertices[iVertexIndex].m_vNormal[0] = tnormal(pNormal[3]);
00387         m_pVertices[iVertexIndex].m_vNormal[1] = tnormal(pNormal[2]);
00388         m_pVertices[iVertexIndex].m_vNormal[2] = tnormal(pNormal[1]);
00389     };
void mudbox::Mesh::SetVertexNormal unsigned int  iVertexIndex,
const Vector vNormal
[inline]
 

Sets the normal of the vertex with the given index.

Parameters:
iVertexIndex  [in] index of the vertex
vNormal  [in] the new vertex normal in local space
00396         {
00397             m_pVertices[iVertexIndex].m_vNormal[0] = tnormal(vNormal.x * MB_NORMALMAX);
00398             m_pVertices[iVertexIndex].m_vNormal[1] = tnormal(vNormal.y * MB_NORMALMAX);
00399             m_pVertices[iVertexIndex].m_vNormal[2] = tnormal(vNormal.z * MB_NORMALMAX);
00400         };
void mudbox::Mesh::SetVertexNormal unsigned int  iVertexIndex,
int  iNormal
[inline]
 

Internal use only. Do not call.

00410         { m_pVertices[iVertexIndex].m_iNormalIndex = iNormal; };
void mudbox::Mesh::SetVertexFreeze unsigned int  iVertexIndex,
unsigned int  iFaceIndex,
float  fFreeze
 

Sets the freeze value for the vertex with the given index.

Parameters:
iVertexIndex  [in] index of the vertex
fFreeze  WHY DO WE NEED A FACE INDEX HERE? [in] New freeze value, ranging from 0.0 (not frozen) to 1.0 (completely frozen)
void mudbox::Mesh::SetVertexMask unsigned int  iVertexIndex,
float  fFMask
 

Internal use only. Do not call.

void mudbox::Mesh::SetVertexStrokeID unsigned int  iVertexIndex,
unsigned int  iStrokeID
const [inline]
 

Internal use only. Do not call.

00425         { m_pVertices[iVertexIndex].m_iStrokeID = iStrokeID; };
virtual void mudbox::Mesh::MarkVertex unsigned int  iVertexIndex  )  [virtual]
 

Mark a particular vertex.

This method, along with Mesh::IsVertexMarked() and Mesh::ClearVertexMarks() is used to aid in traversing all the vertices in a mesh. An algorithm can mark the vertices as it visits them to ensure that it don't visit any twice, and then clear all the marks when complete.

Parameters:
iVertexIndex  [in] index of the vertex to mark
virtual bool mudbox::Mesh::IsVertexMarked unsigned int  iVertexIndex  )  [virtual]
 

Returns true if a particular vertex is marked.

This method, along with Mesh::MarkVertex() and Mesh::ClearVertexMarks() is used to aid in traversing all the vertices in a mesh. An algorithm can mark the vertices as it visits them to ensure that it don't visit any twice, and then clear all the marks when complete.

Parameters:
iVertexIndex  [in] index of the vertex
virtual void mudbox::Mesh::ClearVertexMarks void   )  [virtual]
 

Clears all vertex marks.

This method, along with Mesh::MarkVertex() and Mesh::IsVertexMarked() is used to aid in traversing all the vertices in a mesh. An algorithm can mark the vertices as it visits them to ensure that it don't visit any twice, and then clear all the marks when complete. This is a very fast function.

const Vector& mudbox::Mesh::TriangleVertexPosition unsigned int  iTriangleIndex,
unsigned int  iCornerIndex
const [inline]
 

Returns the position of a corner of a mesh face.

Can be used for triangular meshes only.

Parameters:
iTriangleIndex  [in] index of a triangular face
iCornerIndex  [in] index of a corner in that face (0, 1, or 2)
00461                 { return VertexPosition( TriangleIndex( iTriangleIndex, iCornerIndex ) ); };
const Vector& mudbox::Mesh::QuadVertexPosition unsigned int  iQuadIndex,
unsigned int  iCornerIndex
const [inline]
 

Returns the position of a corner of a mesh face. Can be used for quadric meshes only.

Parameters:
iQuadIndex  [in] index of a quad face
iCornerIndex  [in] index of a corner of that face (0, 1, 2, or 3)
00467                 { return VertexPosition( QuadIndex( iQuadIndex, iCornerIndex ) ); };
const TC& mudbox::Mesh::TriangleVertexTC unsigned int  iTriangleIndex,
unsigned int  iCornerIndex
const [inline]
 

Returns the texture coordinates of a corner of a mesh face.

Can be used for triangular meshes only.

Parameters:
iTriangleIndex  [in] index of a triangular face
iCornerIndex  [in] index of a corner in that face (0, 1, or 2)
00474                 { return VertexTC( TriangleTCI( iTriangleIndex, iCornerIndex ) ); };
const TC& mudbox::Mesh::QuadVertexTC unsigned int  iQuadIndex,
unsigned int  iCornerIndex
const [inline]
 

Returns the texture coordinates of a corner of a mesh face. Can be used for quadric meshes only.

Parameters:
iQuadIndex  [in] index of a quad face
iCornerIndex  [in] index of a corner of that face (0, 1, 2, or 3)
00480                 { return VertexTC( QuadTCI( iQuadIndex, iCornerIndex ) ); };
Vector mudbox::Mesh::TriangleVertexNormal unsigned int  iTriangleIndex,
unsigned int  iCornerIndex
const [inline]
 

Returns the normal of a corner of a mesh face. Can be used for triangular meshes only.

Parameters:
iTriangleIndex  [in] index of a triangular face
iCornerIndex  [in] index of a corner in that face (0, 1, or 2)
00486                 { return VertexNormal( TriangleIndex( iTriangleIndex, iCornerIndex ) ); };
Vector mudbox::Mesh::QuadVertexNormal unsigned int  iQuadIndex,
unsigned int  iCornerIndex
const [inline]
 

Returns the normal of a corner of a mesh face. Can be used for quad meshes only.

Parameters:
iQuadIndex  [in] index of a quad face
iCornerIndex  [in] index of a corner of that face (0, 1, 2, or 3)
00492                 { return VertexNormal( QuadIndex( iQuadIndex, iCornerIndex ) ); };
float mudbox::Mesh::TriangleVertexFreeze unsigned int  iTriangleIndex,
unsigned int  iCornerIndex
const [inline]
 

Returns the freeze value of a corner of a mesh face. Can be used for triangular meshes only.

Parameters:
iTriangleIndex  [in] index of a triangular face
iCornerIndex  [in] index of a corner in that face (0, 1, or 2)
00498                 { return VertexFreeze( TriangleIndex( iTriangleIndex, iCornerIndex ) ); };
float mudbox::Mesh::QuadVertexFreeze unsigned int  iQuadIndex,
unsigned int  iCornerIndex
const [inline]
 

Returns the freeze value of a corner of a mesh face.

(0.0 is not frozen, 1.0 is completely frozen) Can be used for quadric meshes only.

Parameters:
iQuadIndex  [in] index of a quad face
iCornerIndex  [in] index of a corner of that face (0, 1, 2, or 3)
00505                 { return VertexFreeze( QuadIndex( iQuadIndex, iCornerIndex ) ); };
const tnormal* mudbox::Mesh::TriangleVertexNormalArray unsigned int  iTriangleIndex,
unsigned int  iCornerIndex
const [inline]
 

Returns the normal of a corner of a triangle mesh face as an array of 16-bit signed values.

Parameters:
iTriangleIndex  [in] index of a triangular face
iCornerIndex  [in] index of a corner in that face (0, 1, or 2)
00511                 { return VertexNormalArray( TriangleIndex( iTriangleIndex, iCornerIndex ) ); };
const tnormal* mudbox::Mesh::QuadVertexNormalArray unsigned int  iQuadIndex,
unsigned int  iCornerIndex
const [inline]
 

Returns the normal of a corner of a quad mesh face as an array of 16-bit signed values.

Parameters:
iQuadIndex  [in] index of a quad face
iCornerIndex  [in] index of a corner of that face (0, 1, 2, or 3)
00517                 { return VertexNormalArray( QuadIndex( iQuadIndex, iCornerIndex ) ); };
tnormalv mudbox::Mesh::TriangleVertexNormalValue unsigned int  iTriangleIndex,
unsigned int  iCornerIndex
const [inline]
 

Returns the normal a corner of a triangle mesh face as a single 64-bit signed value.

Parameters:
iTriangleIndex  [in] index of a triangular face
iCornerIndex  [in] index of a corner in that face (0, 1, or 2)
00523                 { return VertexNormalValue( TriangleIndex( iTriangleIndex, iCornerIndex ) ); };
tnormalv mudbox::Mesh::QuadVertexNormalValue unsigned int  iQuadIndex,
unsigned int  iCornerIndex
const [inline]
 

Returns the normal a corner of a quad mesh face as a single 64-bit signed value.

Parameters:
iQuadIndex  [in] index of a quad face
iCornerIndex  [in] index of a corner of that face (0, 1, 2, or 3)
00529                 { return VertexNormalValue( QuadIndex( iQuadIndex, iCornerIndex ) ); };
virtual void mudbox::Mesh::EnumerateFaces unsigned int  iFaceIndex,
FaceEnumerator pEnumerator,
bool  bSymmetry = false
[virtual]
 

This method takes an operation that you define (derived from FaceEnumerator) and applies it to the specified face, and sequentially to its neighbors, then the neighbors of those faces, until the mesh has been covered.

In normal use, the entire mesh would not be covered. The FaceEnumerator's Tester() function returns false to limit the spread to a particular area. For example, this is used by sculpt operations to touch all the faces inside the brush ring.

See FaceEnumerator for more details.

Parameters:
iFaceIndex  [in] the index of the starting face
pEnumerator  [in] a pointer to a FaceEnumerator that you define
bSymmetry  [in] make the enumerator follow the defined symmetry. This will probably be removed in future; you should set this to false.
virtual void mudbox::Mesh::EnumerateNearestFaces unsigned int  iFaceIndex,
FaceEnumerator pOperation
[virtual]
 

This method takes an operation that you define (derived from FaceEnumerator) and applies it to the specified face, and sequentially to its immediate neighbours.

See FaceEnumerator for more details.

Parameters:
iFaceIndex  [in] the index of the starting face
pOperation  [in] a pointer to a FaceEnumerator that you define
virtual void mudbox::Mesh::EnumerateVertices unsigned int  iFaceIndex,
VertexEnumerator pEnumerator
[virtual]
 

This method takes an operation that you define (derived from VertexEnumerator) and applies it to all the vertices of the specified face.

See VertexEnumerator for more details.

Parameters:
iFaceIndex  [in] the index of the starting face
pEnumerator  [in] a pointer to a VertexEnumerator that you define
unsigned int mudbox::Mesh::EnumerateAdjacentVertices AdjacentVertexEnumerator pEnumerator,
unsigned int  iVertexIndex,
unsigned int  iFaceIndex
 

This method takes an operation that you define (derived from VertexEnumerator) and applies it to all the vertices adjacent to the specified one. It returns the number of vertices that were visited.

See VertexEnumerator for more details.

Parameters:
pEnumerator  [in] a pointer to a VertexEnumerator that you define
iVertexIndex  [in] the index of the starting vertex
iFaceIndex  [in] index of any face adjacent to that vertex
virtual int mudbox::Mesh::MeshVersion void   )  const [virtual]
 

Obsolete method; do not use.

virtual void mudbox::Mesh::SmoothTextureCoordinates float  fStrength  )  [virtual]
 

Obsolete method; do not use.

virtual void mudbox::Mesh::RecalculateNormals bool  bKeep = false  )  [virtual]
 

Recalculates all the vertex normals. This is called after the mesh shape has changed.

Parameters:
bKeep  Not used
virtual void mudbox::Mesh::RecalculateAdjacency bool  bForce = true  )  [virtual]
 

Causes the mesh to build internal adjacency tables, if they don't exist already.

Parameters:
bForce  [in] Force the tables to be re-built, even if they already exist.
virtual unsigned int mudbox::Mesh::CollectionID void   )  const [virtual]
 

Obsolete method; do not use.

virtual void mudbox::Mesh::IncreaseCollectionID void   )  [virtual]
 

Obsolete method; do not use.

virtual bool mudbox::Mesh::IsSelected void   )  [virtual]
 

Returns true if the whole mesh is selected.

virtual void mudbox::Mesh::SetSelected bool  bOn = true  )  [virtual]
 

Selects or unselects the whole mesh.

virtual class LayerMeshData* mudbox::Mesh::AddLayer void   )  [virtual]
 

Creates and returns a new empty sculpt layer for this mesh, and makes it current.

virtual class LayerMeshData* mudbox::Mesh::ActiveLayer void   )  const [virtual]
 

Returns a pointer to the current sculpt layer for this mesh.

virtual bool mudbox::Mesh::IsActiveLevel void   )  const [virtual]
 

Returns true if this mesh is the currently displayed mesh of the Geometry object it is part of.

virtual bool mudbox::Mesh::Lock class MeshUnlocker pUnlocker = NULL  )  [virtual]
 

Locks the mesh for exclusive modifications.

The caller of this function will get exclusive rights to modify the data stored in the mesh if the return value is true. In other words, mudbox guarantees that no other code will modify the mesh until it is unlocked. The caller can pass the address of a MeshUnlocker objects, which will be used to determine if the mesh can be unlocked, and can perform actions before the unlock happens.

Parameters:
pUnlocker  [in] Address of the unlocker object. If this parameter is NULL, the object can be unlocked any time
virtual bool mudbox::Mesh::Unlock void   )  [virtual]
 

Unlock the mesh.

Returns true if the operation was executed successfully, or if the mesh was unlocked at the time of the call. If the mesh was locked, and a MeshUnlocker object was specified by the Lock call, that MeshUnlocker object will be used to determine if the mesh can be unlocked.

virtual bool mudbox::Mesh::IsLocked void   )  [virtual]
 

Returns true if the mesh is locked.

class MeshChange* mudbox::Mesh::StartChange void   ) 
 

This method must be called by any plugin before it modifies vertex data.

It returns a MeshChange object that will hold the needed undo information.

virtual bool mudbox::Mesh::IsNSided void   )  [virtual]
 

Returns if the mesh contains non tri or quad faces.

virtual bool mudbox::Mesh::HasExpandedTCs void   )  const [virtual]
 

Returns if the mesh has edge bleeded TC layout.

Can be used instead of the normal TC layot if we want to modify texture without artifact at shell borders.

virtual void mudbox::Mesh::CreateExpandedTCs void   )  [virtual]
 

Calculates the edge bleeded TC layout.

virtual TC& mudbox::Mesh::ExpandedTC unsigned int  index  )  [virtual]
 

Returns the Expanded TC value for the given vertex.


Member Data Documentation

Store<TC> mudbox::Mesh::m_pTCs
 
Store<Vertex> mudbox::Mesh::m_pVertices [protected]
 
unsigned int mudbox::Mesh::m_iVertexCount [protected]
 

mudbox::Mesh mudbox::Mesh mudbox::Mesh mudbox::Mesh mudbox::Mesh mudbox::Mesh mudbox::Mesh mudbox::Mesh mudbox::Mesh mudbox::Mesh
mudbox::Mesh mudbox::Mesh mudbox::Mesh mudbox::Mesh mudbox::Mesh mudbox::Mesh mudbox::Mesh mudbox::Mesh mudbox::Mesh mudbox::Mesh